package com.koron.system.staff.service;

import com.koron.bean.app.AppSimpleBean;
import com.koron.bean.base.Response;
import com.koron.bean.query.PageQuery;
import com.koron.bean.system.org.OrgVo;
import com.koron.bean.system.role.RoleStaffBean;
import com.koron.bean.system.staff.StaffBean;
import com.koron.bean.system.staff.dto.OutStaffBean;
import com.koron.bean.system.staff.dto.StaffBeanDto;
import com.koron.bean.system.staff.po.AppUserPo;
import com.koron.bean.system.staff.vo.AppUserVo;
import com.koron.bean.system.staff.vo.EamUser;
import com.koron.common.core.business.common.service.CommonService;
import com.koron.system.staff.bean.WorkFlowUser;
import com.koron.system.staff.bean.dto.AppUserDto;
import com.koron.system.staff.bean.dto.ForgetPwDto;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @ClassName StaffService
 * @description
 * @Author zhouj
 * @Date 2021/7/6 14:28
 */
public interface StaffService extends CommonService {

    int insertOrUpdate(AppUserPo appUserPo);

    int insertUser(EamUser user, AppUserDto appUserDto, MultipartFile photo);

    int updateUser(EamUser user, AppUserDto appUserDto, MultipartFile photo, String delPhotoId);

    int delete(String id);

    int deleteWithOrg(String id, String orgId);

    int deleteIds(List<String> ids, String orgId);

    int batchInUpUser(EamUser user, List<AppUserPo> staffBeans);

    List<StaffBean> queryStaffListByOrg(Integer cascadeQuery, StaffBeanDto staffBeanDto, PageQuery pageQuery);

    Long queryStaffListByOrgCount(Integer cascadeQuery, StaffBean staffBean);

    List<AppUserVo> queryStaffListByOrgWithMerge(Integer cascadeQuery, StaffBean staffBean, PageQuery pageQuery, Boolean isStsFlag);

    Long queryStaffListByOrgWithMergeCount(Integer cascadeQuery, StaffBean staffBean);

    EamUser queryStaffInfo(String account);

    EamUser queryAgentStaffInfo(String account);

    AppUserVo queryStaffInfoWithMerge(String account);

    List<WorkFlowUser> getWorkFlowUserList();

    StaffBean querySingleStaffInfo(StaffBean staffBean);

    StaffBean querySingleStaffInfoByAccount(String account);

    Response outStafflogin(OutStaffBean outStaffBean, HttpServletResponse response);

    Response outStafflogin(OutStaffBean outStaffBean, HttpServletResponse response, Boolean needVerityCode);

    List<String> queryAccountByStaffOrOrgList(List<RoleStaffBean> list1, List<RoleStaffBean> list2);

    int resetPy();

    Response verifyStaffInfo(OutStaffBean outStaffBean);

    Response verifyAccountPassword(String account, String password);

    Response resetPw(String account, String password, String prePassword);

    List<OrgVo> queryOrgVoListByAccount(String account);

    List<AppSimpleBean> queryAppSimpleInfoListByAccount(String account);

    int clearDefaultAppId(String defaultAppId);

    String getInitPassWord();

    Response forgetPw(ForgetPwDto forgetPwDto);

    Response outStaffloginByPhone(OutStaffBean outStaffBean, HttpServletResponse response);
}
